#include<stdio.h>
#include<assert.h>
#include <string.h>
char* my_strncat(char* s1 , const char* s2 , size_t size)
{
	assert(s1 && s2);
	char* ret=s1;
	while(*s1)
	{
		s1++;
	}
	do
	{
		*s1=*s2;
		s1++;
		s2++;
	}while(--size);
	return ret;
}

int main()
{
   char string[80] = "This is the initial string!";
   char suffix[] = " extra text to add to the string...";
   /* Combine strings with no more than 19 characters of suffix: */
   printf( "Before: %s\n", string );
   my_strncat( string, suffix, 19 );
   printf( "After:  %s\n", string );
   return 0;
}

